package com.miyake.dsp.osa.lab.wrapper;

import com.miyake.dsp.generator.GaussGenerator;
import com.miyake.dsp.generator.GaussSetting;
import com.miyake.dsp.osa.lab.Calculator;
import com.miyake.dsp.osa.lab.LabUiAnnotation;
@LabUiAnnotation(caption="Gauss Generator")
public class GaussWrapper extends Calculator {
	public static final String OUT_Y = "Y";
	public static final String OUT_X = "X";
	private GaussSetting setting;
	
	public GaussWrapper(GaussSetting setting) {
		this.setting = setting;
		initOutput(OUT_X);
		initOutput(OUT_Y);
	}
	
	@Override
	public synchronized void process() {
		GaussGenerator gauss = new GaussGenerator(setting.getSigma(), setting.getMu(), setting.getSamples(), setting.getN());
		setOutput(OUT_X, gauss.getX());
		setOutput(OUT_Y, gauss.getY());
	}

	@Override
	public Object getSetting() {
		return this.setting;
	}

}
